Skip to content

feat(ci): add SDK proto sync CI with drift detection and dashboard#2344

Draft
rhuss wants to merge 1 commit into
NVIDIA:mainfrom
rhuss:6114-sdk-proto-sync-ci-clean
Draft

feat(ci): add SDK proto sync CI with drift detection and dashboard#2344
rhuss wants to merge 1 commit into
NVIDIA:mainfrom
rhuss:6114-sdk-proto-sync-ci-clean

Conversation

@rhuss

@rhuss rhuss commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds automated proto drift detection and remediation infrastructure for multi-language SDKs, building on the proto management approach discussed in #2271.

In PR #2271, we discussed how SDK proto files are copied from proto/ into each SDK directory to decouple SDK maintenance from core API evolution. This PR implements the automation we proposed to make that model work reliably: CI-based drift detection, a status dashboard, and agent-actionable issue creation when SDKs fall behind.

Merge order

Merge #2271 first, then this PR.

This PR extends tasks/go.toml (created by #2271) with drift detection tasks. The branch is rebased on top of go-sdk-a-foundation. Once #2271 lands on main, this PR will rebase cleanly.

What this adds

Mise tasks (locally testable, no GitHub dependency):

  • go:proto:drift: Compares proto/*.proto against sdk/go/proto/*.proto, outputs a JSON report with per-file sync status (synced/modified/added/removed) and diff line counts. Exit code 0 if synced, 1 if drifted.
  • go:proto:build-check: Runs the full remediation pipeline (sync, generate, build, test) and reports which step failed with its log output.

PR gate workflow (sdk-proto-check.yml):

  • Runs on every PR push to pull-request/* branches
  • Posts a non-blocking warning annotation when SDK proto copies drift from root definitions
  • Does not block merge, only provides early visibility

Scheduled dashboard workflow (sdk-sync-dashboard.yml):

  • Runs daily (06:00 UTC) and via workflow_dispatch
  • Updates a GitHub wiki page (SDK-Sync-Status) with sync status per SDK
  • Creates/updates GitHub issues with full context when drift + build failure is detected: proto diff, build log (last 500 lines), affected SDK files, and fix commands
  • Deduplicates issues by checking for existing open issues with the sdk-sync:<lang> label
  • Fires repository_dispatch event (sdk-sync-drift) for agent pickup

Design principles:

  • Matrix-based workflow: adding a new SDK requires only one matrix entry and the corresponding mise tasks
  • Detection logic is in mise tasks (testable locally with mise run go:proto:drift)
  • GitHub-specific integration (wiki, issues, dispatch) stays in the workflow YAML

Related

Testing

  • mise run go:proto:drift tested locally with both synced and drifted states
  • Workflow YAML structure follows existing branch-checks.yml patterns (pr-gate action, CI container, concurrency groups)
  • Workflow validation will run on CI when this PR is submitted

@rhuss
rhuss requested review from a team, derekwaynecarr, maxamillion and mrunalp as code owners July 17, 2026 10:35
@copy-pr-bot

copy-pr-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@rhuss
rhuss force-pushed the 6114-sdk-proto-sync-ci-clean branch 3 times, most recently from f9480c8 to c55f073 Compare July 17, 2026 12:39
Add automated proto drift detection for multi-language SDKs:

- sdk_sync.py: Python script with six subcommands (drift-report,
  dashboard, issue-body, wiki-push, manage-issue, dispatch) for
  testable, lintable sync logic
- sdk_sync_test.py: 22 pytest tests covering drift detection,
  dashboard generation, issue body formatting, log truncation,
  wiki push, issue management, repository dispatch, and agent prompt
- go:proto:drift mise task: calls sdk_sync.py drift-report
- go:proto:build-check mise task: runs full sync+gen+build+test pipeline
- sdk-proto-check.yml: PR gate workflow with non-blocking warning annotations
- sdk-sync-dashboard.yml: scheduled daily workflow for wiki dashboard,
  agent-actionable issue creation, and repository_dispatch

Auto-created drift issues include an "Agent Instructions" section with
a structured prompt that an AI agent can directly consume to fix the
drift and create a PR. The prompt includes the scope, affected files,
converter/types paths, fix steps, and commands to verify.

Signed-off-by: Roland Huß <rhuss@redhat.com>
@rhuss
rhuss force-pushed the 6114-sdk-proto-sync-ci-clean branch from c55f073 to 5b15133 Compare July 17, 2026 14:13
@rhuss
rhuss marked this pull request as draft July 17, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant